import http from '../../utils/http'

Page({

    /**
     * 页面的初始数据
     */
    data: {
        leftScrollTop: 0,
        sortList: [],
        isTouchScrollView: false,
        rightIndex: 0,
        leftIndex: 0,
        nodeRightList: [],
        nodeLeftList: [],
        asideH: 0,
        headerH: 0
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {
        this.getCate();
    },

    async getCate() {
        let res = await http.request('http://likeshopv2.yixiangonline.com/api/goods_category/lists', {}, {
            headers: {
                token: 'd74120e227ab2c0ee5744d77a96991af'
            }
        })
        let list = res.data
        console.log(list);
        this.setData({ sortList: list })
    }
})